<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta content="招聘" http-equiv="keywords">
    <meta name="description" content="招聘,培训">
    <meta name="format-detection" content="telephone=no"><!-- 禁止IPHONE识别手机号码 -->
    <meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
    <meta name="renderer" content="webkit">

    <title>修改联系人</title>
    <!-- css -->
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/index.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/swiper.min.css}">
    <!-- public_css -->
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/public_lib.css}">
    <!-- zy_public_css -->
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/zy_public.css}">
    <!-- 子页css -->
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/children.css}">
    <!-- js -->
    <script type="text/javascript" th:src="@{/asserts/js/jquery-3.3.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/asserts/js/swiper.min.js}"></script>
    <script type="text/javascript" th:src="@{/asserts/js/public.js}"></script>
    <script th:src="@{/asserts/Apolar_sh/lib/layer/2.4/layer.js}"></script>
</head>
<body>
<header class="zy_search_top_box scroll_fix">
    <div class="zy_title_top fix">
        <div class="one" href="javascript:" onclick="history.back();"><img th:src="@{/asserts/images/back_jt.png}">
            <a style="color: #FFFFFF;"><span>返回</span></a>
        </div>
        <h1>修改联系人</h1>
    </div>
</header>

<!-- 内容框 -->
<div class="zy_module-content zy_vip_conbox">
    <div class="zy_vip_scbox zy_vip_myfabu bgwh">

        <div class="sc_list vip_user_info_mima vip_user_createbox">
            <!-- 发布职位招聘 -->
            <div class="reason">修改联系人</div>
            <!--<form method="post" th:action="@{/mCampusConn/update(RcurrentPage=${RcurrentPage},RpageSize=${RpageSize})}">-->
            <form id="addForm">
                <input type="text" hidden id="campusId" name="campusId" th:value="${campusConn.campusId}">
                <input type="text" hidden name="campusConnId" th:value="${campusConn.campusConnId}">
                <div class="write">
                    <div class="form_line">
                        <label><span>院校名称</span><input type="text" th:value="${campusName}" readonly></label>
                    </div>
                    <div class="form_line">
                        <label><span>姓名</span><input type="text" name="campusConnName" id="name"
                                                     th:value="${campusConn.campusConnName}"></label>
                    </div>
                    <div class="form_line bbd xzbox work_style">
                        <span>职务</span>
                        <select name="campusConnPosition">
                            <option th:value="${campusConn.campusConnPosition}"
                                    th:text="${campusConn.campusConnPosition}" selected>院长
                            </option>
                            <option value="院长">院长</option>
                            <option value="副院长">副院长</option>
                            <option value="书记">书记</option>
                            <option value="主任">主任</option>
                            <option value="老师">老师</option>
                            <option value="其它">其它</option>
                        </select>
                    </div>
                    <div class="form_line bbd xzbox work_style">
                        <span>性别</span>
                        <select name="campusConnSex">
                            <option th:value="${campusConn.campusConnSex}"
                                    th:text="${campusConn.campusConnSex}" selected>男
                            </option>
                            <option value="女">女</option>
                            <option value="男">男</option>
                        </select>
                    </div>
                    <div class="form_line bbd xzbox work_style">
                        <span>性别</span>
                        <select name="marketEmployeeId">
                            <option th:value="${campusConn.marketEmployeeId}"
                                    th:text="${campusConn.personname}" selected>
                            </option>
                        </select>
                    </div>
                    <div class="form_line">
                        <label><span>联系方式</span><input type="tel" name="campusConnWay" id="phone"
                                                       th:value="${campusConn.campusConnWay}"></label>
                    </div>
                    <div class="form_line">
                        <label><span>个人情况</span><textarea name="campusConnPersonal"
                                                          th:text="${campusConn.campusConnPersonal}"></textarea></label>
                    </div>
                    <div class="form_line">
                        <label><span>创建时间</span>
                            <input type="date" name="campusConnCreateDate" readonly
                                   th:value="${#dates.format(campusConn.campusConnCreateDate, 'yyyy-MM-dd')}"
                            ></label>
                    </div>
                    <div class="form_line">
                        <label><span>修改时间</span>
                            <input type="date" name="campusConnModifyDate" id="date"
                                   th:value="${#dates.format(campusConn.campusConnModifyDate, 'yyyy-MM-dd')}"
                                   required></label>
                    </div>
                    <div class="form_line">
                        <label><span>备注</span><textarea name="campusConnRemarks"
                                                        th:text="${campusConn.campusConnRemarks}"></textarea></label>
                    </div>
                    <!--<button class="zy_butn bord_3" type="submit">保存</button>-->
                    <a th:onclick="submit([[${RcurrentPage}]],[[${RpageSize}]])">
                        <div class="zy_butn bord_3"> 保存</div>
                    </a>
                </div>
            </form>
        </div>

    </div>

</div>
<!-- 底部导航 -->
<div class="foot_menu">
    <ul>
        <li><a style="color: #00caff" th:href="@{/mcampus/findAll}"> <i><img
                th:src="@{/asserts/images/menu_icon01.png}"></i> <span>信息采集</span> </a>
        </li>
        <li><a th:href="@{/mcampusVisit/findAll}"> <i><img
                th:src="@{/asserts/images/menu_icon02.png}"></i>
            <span>拜访记录</span> </a></li>
        <li><a th:href="@{/mTraining/list}"> <i><img
                th:src="@{/asserts/images/menu_icon03.png}"></i>
            <span>实训订单</span></a></li>
        <li><a th:href="@{/mds/dsShow}"> <i><img
                th:src="@{/asserts/images/menu_icon04.png}"></i>
            <span>日常经费</span> </a></li>
    </ul>
</div>

</body>
<script>
    function submit(RcurrentPage, RpageSize) {
        var name = $("#name").val();
        var phone = $("#phone").val();
        var campusId = $("#campusId").val();
        var date = $("#date").val();
        if (name == null || name === "") {
            layer.msg('亲，姓名不能为空哦!', {
                icon: 0,
                time: 1000
            });
        } else if (phone == null || phone === "") {
            layer.msg('亲，联系方式不能为空哦!', {
                icon: 0,
                time: 1500
            });
        } else if (date == null || date === "") {
            layer.msg('亲，修改时间不能为空哦!', {
                icon: 0,
                time: 1500
            });
        }
        else
            {
                $.ajax({
                    type: 'POST',
                    url: './update?RcurrentPage=' + RcurrentPage + '&RpageSize=' + RpageSize,
                    data: $("#addForm").serialize(),
                    success: function (data) {
                        if (data == '1') {
                            layer.msg('更新成功！', {icon: 1, time: 500});
                            setTimeout(function () {
                                location.replace('[[${#httpServletRequest.getContextPath()}]]' + '/mCampusConn/findAll?campusId=' + campusId + '&RcurrentPage=' + RcurrentPage + '&RpageSize=' + RpageSize);
                            }, 500);
                        } else {
                            layer.msg('更新失败', {icon: 0, time: 2000});
                        }
                    },
                    error: function (data) {
                        console.log(data.msg);
                    }
                })
            }
        }
</script>
</html>
